<template>
  <div class="mask" v-show="isShow">
    <van-circle
      v-model="currentRate"
      :color="gradientColor"
      :rate="100"
      :speed="100"
      :text="text"
    />
  </div>
</template>

<script>
import Vue from 'vue'
import { circle } from 'vant'
Vue.use(circle)
export default {
  data () {
    return {
      isShow: false,
      currentRate: 0,
      gradientColor: {
        '0%': '#3fecff',
        '100%': '#6149f8'
      }
    }
  },
  computed: {
    text () {
      return this.currentRate.toFixed(0) + '%'
    }
  }
}
</script>

<style lang="scss" scoped>
.mask {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 10000;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
}
</style>
